﻿<%template _websiteheader%>
<%if page_err==0%>
<%csharp%>
/*
聚合首面方法说明

///////////////////////////////////////////////////////////////////////////////////////////////

方法名称: GetForumTopicList(count, views, forumid, timetype, ordertype, isdigest, onlyimg)
方法说明: 返回指定条件的主题列表信息
参数说明:
          count : 返回的主题数 
          views : 浏览量 [返回等于或大于当前浏览量的主题]
          forumid : 版块ID [默认值 0 为所有版块]
          timetype : 指定时间段内的主题 [ TopicTimeType.Day(一天内)  , TopicTimeType.Week(一周内),   TopicTimeType.Month(一个月内),   TopicTimeType.SixMonth(六个月内),  TopicTimeType.Year(一年内),  TopicTimeType.All(默认 从1754-1-1至今的所有主题)
          ordertype : 排序字段(降序) [TopicOrderType.ID(默认 主题ID) , TopicOrderType.Views(浏览量),   TopicOrderType.LastPost(最后回复),    TopicOrderType.PostDateTime(按最新主题查),    TopicOrderType.Digest(按精华主题查),    TopicOrderType.Replies(按回复数)]  
          isdigest : 是否精化 [true(仅返回精华主题)   false(不加限制)]
          onlyimg : 是否包含附件 [true(仅返回包括图片附件的主题)   false(不加限制)]
      
//////////////////////////////////////////////////////////////////////////////////////////////    

方法名称: GetHotForumList(count)   
方法说明: 返回指定数量的热门版块列表
参数说明:
          count : 返回的版块数
    
//////////////////////////////////////////////////////////////////////////////////////////////      

方法名称: GetForumList(forumid)   
方法说明: 返回指定版块下的所有子段块列表
参数说明:
          forumid : 指定的版块id
      
//////////////////////////////////////////////////////////////////////////////////////////////  

方法名称: GetLastPostList(forumid, count)   
方法说明: 返回指定版块下的最新回帖列表
参数说明:
          forumid : 指定的版块id     
          count : 返回的回帖数
 
//////////////////////////////////////////////////////////////////////////////////////////////  

方法名称: GetAlbumList(photoconfig.Focusalbumshowtype, count, days)   
方法说明: 返回指定条件的相册列表
参数说明:
          photoconfig.Focusalbumshowtype : 排序字段(降序) [1(浏览量), 2(照片数), 3(创建时间)]    注:管理后台聚合设置项
          count : 返回的相册数
          days :有效天数 [指定天数内的相册]
      
//////////////////////////////////////////////////////////////////////////////////////////////  

方法名称: GetWeekHotPhotoList(photoconfig.Weekhot)
方法说明: 返回指定数量的热门图片
参数说明:
          photoconfig.Weekhot : 返回的热图数量  注:管理后台聚合设置项
          
//////////////////////////////////////////////////////////////////////////////////////////////  

方法名称: GetSpaceTopComments(count)
方法说明: 返回指定数量的空间最新评论
参数说明:
          count : 返回的评论数
          
//////////////////////////////////////////////////////////////////////////////////////////////  

方法名称: GetRecentUpdateSpaceList(count)
方法说明: 返回指定数量的最新更新空间列表
参数说明:
          count : 返回的空间信息数


//////////////////////////////////////////////////////////////////////////////////////////////  

方法名称: GetGoodsList(condition, orderby, categoryid, count)
方法说明: 返回指定数量的最新更新空间列表
参数说明:
          condition : 条件 [recommend(仅返回推荐商品, 商城模式下可用) , quality_new(仅返回全新(状态)商品),    quality_old(仅返回二手(状态)商品)]  
          orderby: 排序字段(降序) [viewcount(按浏览量排序),    hotgoods(按商品交易量排序),  newgoods(按发布商品先后顺序排序) ]
          categoryid : 商品所属分类id [默认值 0 为不加限制]
          count : 返回的商品数
          
 
//////////////////////////////////////////////////////////////////////////////////////////////  

方法名称: GetUserList(count, orderby)
方法说明: 返回指定数量及排序方式的用户列表
参数说明:
          count : 返回的用户数       
          orderby: 排序字段(降序) [credits(用户积分), posts(用户发帖数), lastactivity(最后活动时间), joindate(注册时间), oltime(在线时间)]
*/
<%/csharp%>       
<script type="text/javascript" src="javascript/template_website.js"></script>
<div class="main wrap s_clear" id="wrap">
	<div class="box firstbox">
		<div class="focusbox">
		<%if {rotatepicdata}!=null && {rotatepicdata}!=""%>			
			<div class="modulebox sidebox" style="padding:1px;">
				<script type='text/javascript'>
				var imgwidth = 237;
				var imgheight = 210;
				</script>			
				<!--图片轮换代码开始-->
				<script type="text/javascript" src="javascript/template_rotatepic.js"></script>
				<script type="text/javascript">
				var data = { };
				
				{rotatepicdata}
				
				var ri = new MzRotateImage();
				ri.dataSource = data;
				ri.width = 237;
				ri.height = 210;
				ri.interval = 3000;
				ri.duration = 2000;
				document.write(ri.render());
				
				</script>
				<!--图片轮换代码结束-->
			</div>
        <%/if%>	    
		</div>
	</div>
	<div class="box newtopicbox">
		<%if postlist.Length>0 %>
            <%loop (PostInfo) toppost postlist%> 	
				<%if {toppost[_id]}==2%>
				<ul class="topiclist">
				<%/if%>
                <%if {toppost[_id]}==1%>		
				<dl>
				<dt><h1><a href="{forumurl}{ShowTopicAspxRewrite(toppost.Tid,0)}">{toppost.title}</a></h1></dt>
				<dd>{toppost.message} </dd>
				</dl>
				<%else%>
				<li><cite>{toppost.poster}</cite><a href="{forumurl}{ShowTopicAspxRewrite(toppost.Tid,0)}">{toppost.title}</a></li>
				<%/if%>
				<%if {toppost[_id]}=={postlist.Length}%>
				</ul>
				<%/if%>
				

            <%/loop%>					
		<%/if%>
		<%if {postlist.Length}<2%>
		<ul class="topiclist">
		<%if {postlist.Length}==1%>
		    <%set {topiclist} = forumagg.GetForumTopicList(6, 0, 0, TopicTimeType.Day, TopicOrderType.Replies, false, false)%>	
		<%else  if {postlist.Length}==0%>
		    <%set {topiclist} = forumagg.GetForumTopicList(10, 0, 0, TopicTimeType.Day, TopicOrderType.Replies, false, false)%>	
		<%/if%>
		<%loop toptopicinfo topiclist%> 
            <li>
                <cite>
                    <%set {aspxrewriteurl} = this.ShowForumAspxRewrite({strtoint({toptopicinfo[fid]})},0,{toptopicinfo[rewritename]})%>
                    <a href="{forumurl}{aspxrewriteurl}" target="_blank">{toptopicinfo[name]}</a>
                </cite>
                <%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({toptopicinfo[tid]},0)%>
                <a href="{forumurl}{aspxrewriteurl}" target="_blank"><%getsubstring({toptopicinfo[title]},43,"...")%></a>
           </li>            
        <%/loop%>
		</ul>
		<%/if%>
	</div>
	<div class="box sidebox">
		<div class="titlebar"><ul><li class="current" id="li_hotforum"><a href="javascript:;" onclick="javascript:tabselect($('li_hotforum'));">热门版块</a></li><li id="li_bbsmessage"><a href="javascript:;" onclick="javascript:tabselect($('li_bbsmessage'));">论坛信息</a></li><%if {config.enabletag}==1%><li id="li_hottags"><a href="javascript:;" onclick="javascript:tabselect($('li_hottags'));">标签</a></li><%/if%></ul></div>
		<div class="sideinner">
		<ul id="hotforum">
        <%loop __foruminfo forumagg.GetHotForumList(10)%> 						
            <%set {aspxrewriteurl} = ShowForumAspxRewrite({strtoint({__foruminfo[fid]})},0, {__foruminfo[rewritename]})%>				
			<li><em>{__foruminfo[posts]}帖</em><cite <%if {__foruminfo[_id]}==1%>class="first"<%/if%> <%if {__foruminfo[_id]}==2%>class="second"<%/if%> <%if {__foruminfo[_id]}==3%>class="third"<%/if%> > {__foruminfo[_id]}</cite><a href="{forumurl}{aspxrewriteurl}" target="_blank">{__foruminfo[name]}</a></li>
        <%/loop%>
		</ul>
		<ul id="bbsmessage"  style="display:none;">
			<li>会员总数: <i>{totalusers}</i>人</li>
			<li>最新注册会员:<i><%set {aspxrewriteurl} = this.UserInfoAspxRewrite({lastuserid})%><a href="{aspxrewriteurl}" target="_blank">{lastusername}</a></i></li>
			<li>主题数:<i>{totaltopic}</i>主题</li>
			<li>帖子数:<i>{totalpost}</i> 个(含回帖) </li>
			<li>今  日:<i>{todayposts}</i>帖  昨 日: <i>{yesterdayposts}</i> 帖</li>
			<%if {highestpostsdate}!=""%>
			    <li>	
		            最高日:<i>{highestposts}</i>帖
		        </li>
		        <li>	
		            最高发帖日:<i>{highestpostsdate}</i>
		        </li>
		    <%/if%>
			<li>在线总数:<i>{totalonline}</i>人</li>
			<li>最高在线:<i>{highestonlineusercount}</i> 人 </li>
			<li>发生于:<i>{highestonlineusertime}</i></li>
		</ul>
		
		<div id="hottags"  class="forumtag" style="display:none;">
		 <%if {taglist.Length}>0%>
			<%loop (TagInfo) tag taglist%>
				<a 
				<%if {config.aspxrewrite}==1%>
					href="topictag-{tag.tagid}.aspx" 
				<%else%>
					href="tags.aspx?t=topic&tagid={tag.tagid}" 
				<%/if%>
				<%if {tag.color}!=""%>	
					style="color: #{tag.color};"
				<%/if%>
					title="{tag.fcount}">{tag.tagname}</a>
			<%/loop%>
		 <%else%>
		    暂无数据!
		 <%/if%>
		</div>
		</div>
	</div>
</div>

<script type="text/javascript">
var reco_topic = {forumagg.GetTopicJsonFromFile()};
var templatepath = "{templatepath}";
var aspxrewrite = {config.aspxrewrite};
</script>
<%loop (int) forumid Discuz.Aggregation.AggregationFacade.ForumAggregation.GetRecommendForumID()%> 		
<%set (ForumInfo) {foruminfo} = Forums.GetForumInfo(forumid)%>		
<%if {foruminfo}!=null %>		
<div class="main wrap s_clear">
	<div class="box topicbox">
		<span>
		<%loop sub_forum Forums.GetForumList(forumid)%>
		    <%if {sub_forum[_id]}<=5 %>
		    <%set {aspxrewriteurl} = this.ShowForumAspxRewrite({strtoint({sub_forum[fid]})},0,{sub_forum[rewritename]})%>
		    <a href="{aspxrewriteurl}" tabindex="_blank">{sub_forum[name]}</a>
		    <%/if%>
		<%/loop%>
		<%set {aspxrewriteurl} = this.ShowForumAspxRewrite({forumid},0,{foruminfo.rewritename})%>
		<a href="{aspxrewriteurl}" tabindex="_blank">更多&gt;&gt;</a>
		</span>
		<h2><a href="{aspxrewriteurl}" tabindex="_blank">{foruminfo.Name}</a></h2>
		<script type="text/javascript">document.write(showtopicinfo({forumid}, {forumid[_id]}-1));</script>
		<ul class="topiclist">
		 <%set {topiclist} = forumagg.GetForumTopicList(8, 0, forumid, TopicTimeType.All, TopicOrderType.PostDateTime, false, false)%>	
		 <%loop newtopicinfo topiclist%> 
		   <li>
                <cite>
                    <%set {aspxrewriteurl} = ShowForumAspxRewrite({strtoint({newtopicinfo[fid]})},0,{newtopicinfo[rewritename]})%>
                    <a href="{forumurl}{aspxrewriteurl}" target="_blank">{newtopicinfo[name]}</a>
                </cite>
                <%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({newtopicinfo[tid]},0)%>
                <a title="{newtopicinfo[title]}" href="{forumurl}{aspxrewriteurl}" target="_blank"><%getsubstring({newtopicinfo[title]},43,"...")%></a>
           </li>   
		 <%/loop%>
		</ul>
	</div>
	<div class="box sidebox">
		<div class="titlebar"><ul><li class="current" id="li_forum_{forumid}_topic"><a href="javascript:;" onclick="javascript:tabselect($('li_forum_{forumid}_topic'),{forumid});">最热主题</a></li><li id="li_forum_{forumid}_reply"><a href="javascript:;" onclick="javascript:tabselect($('li_forum_{forumid}_reply'), {forumid});">最新回复</a></li><li id="li_forum_{forumid}_digest"><a href="javascript:;" onclick="javascript:tabselect($('li_forum_{forumid}_digest'), {forumid});">精华</a></li></ul></div>
		<div class="sideinner">
		<ul id="forum_{forumid}_topic" class="topicdot">
		 <%set {topiclist} = forumagg.GetForumTopicList(8, 0, forumid, TopicTimeType.All, TopicOrderType.Replies, false, false)%>	
		 <%if {topiclist.Rows.Count}>0%>
		 <%loop hottopicinfo topiclist%> 
		    <%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({hottopicinfo[tid]},0)%>
            <li><em>{hottopicinfo[replies]}</em><a title="{hottopicinfo[title]}" href="{aspxrewriteurl}" target="_blank"><%getsubstring({hottopicinfo[title]},28,"...")%></a></li> 
		 <%/loop%>
		 <%else%>
		    暂无数据!
		 <%/if%>
		</ul>
		<ul id="forum_{forumid}_reply" class="topicdot" style="display:none;">
		 <%set {topiclist} = forumagg.GetForumTopicList(8, 0, forumid, TopicTimeType.All, TopicOrderType.LastPost, false, false)%>	
		 <%if {topiclist.Rows.Count}>0%>
		 <%loop replytopic topiclist%> 
            <li><a title="{replytopic[title]}" href="{forumurl}showtopic.aspx?topicid={replytopic[tid]}&page=end#lastpost" target="_blank"><%getsubstring({replytopic[title]},28,"...")%></a></li> 
		 <%/loop%>
		 <%else%>
		    暂无数据!
		 <%/if%>
		</ul>
		<ul id="forum_{forumid}_digest" class="topicdot" style="display:none;">
		 <%set {topiclist} = forumagg.GetForumTopicList(8, 0, forumid, TopicTimeType.All, TopicOrderType.LastPost, true, false)%>	
		 <%if {topiclist.Rows.Count}>0%>
		 <%loop replytopic topiclist%> 
            <li><a title="{replytopic[title]}" href="{forumurl}showtopic.aspx?topicid={replytopic[tid]}&page=end#lastpost" target="_blank"><%getsubstring({replytopic[title]},28,"...")%></a></li> 
		 <%/loop%>
		 <%else%>
		    暂无数据!
		 <%/if%>
		</ul>
		</div>
	</div>
</div>
<%/if%>
<%/loop%>

<!--<div class="adinner"><img src="images/gather/ad.gif" alt="广告"/></div>-->
<%if {config.enablealbum}==1%>
<div class="main wrap s_clear">
	<div class="box albumbox">
		<span>
		<%loop (AlbumCategoryInfo) ac albumcategorylist%>
		    <%if {ac[_id]}<5 %>
				<a href="showalbumlist.aspx?cate={ac.albumcateid}" target="_blank">{ac.title}</a>
		    <%/if%>
		<%/loop%>
		<a href="albumindex.aspx" target="_blank">更多&gt;&gt;</a></span>
		<h2>推荐相册</h2>
		<%loop (AlbumInfo) __albuminfo recommendalbumlist%>
			<%if {__albuminfo[_id]}<=4 %>
			<dl>
			    <dd>
			        <a href="{albumurl}showalbum.aspx?albumid={__albuminfo.albumid}">
			            <%if {__albuminfo.logo}!=""%>
			                <img src="{__albuminfo.logo}" alt="{__albuminfo.title}" style="height: 75px; width: 115px"/>
				        <%else%>
							<img src="templates/{templatepath}/images/NoPhoto.jpg" alt="{__albuminfo.albumid}"  style="height: 75px; width: 115px"/>
						<%/if%>	
				    </a>
				</dd>
				<dt><a href="{albumurl}showalbum.aspx?albumid={__albuminfo.albumid}" target="_blank">{__albuminfo.title}</a> ({__albuminfo.imgcount})</dt>
		    </dl>
		    <%/if%>
		<%/loop%>
	</div>
	<div class="box sidebox">
		<div class="sidetitlebar"><ul><li class="current" id="li_album"><a href="javascript:;" onclick="javascript:tabselect($('li_album'));">热门相册</a></li><li id="li_photo"><a href="javascript:;" onclick="javascript:tabselect($('li_photo'));">热门相片</a></li></ul></div>
		<div class="sideinner">
		<ul id="albumlist" class="topicdot">
		<%set {albumlist} = albumagg.GetAlbumList(photoconfig.Focusalbumshowtype, 7, 180)%>
		<%if {albumlist.count}>0%>
        <%loop (AlbumInfo) hotalbuminfo albumlist%>
			<li><em>{hotalbuminfo.Views}</em><a href="showalbum.aspx?albumid={hotalbuminfo.albumid}" target="_blank">{hotalbuminfo.title}</a> (<a href="showalbumlist.aspx?uid={hotalbuminfo.userid}">{hotalbuminfo.username}</a>)</li>
		<%/loop%>
		<%else%>
		    暂无数据!
		<%/if%>
		</ul>
		<ul id="photolist" class="topicdot" style="display:none;">
		  <!--一周热图总排行-->
        <%set {photolist} = albumagg.GetWeekHotPhotoList(photoconfig.Weekhot)%>
        <%if {photolist.count}>0%>
        <%loop (PhotoInfo) __photolist photolist%>
			<li><em>{__photolist.Views}</em><a href="showphoto.aspx?photoid={__photolist.photoid}" target="_blank">{__photolist.title}</a> (<a href="showalbumlist.aspx?uid={__photolist.userid}">{__photolist.username}</a>)</li>
		<%/loop%>
		<%else%>
		    暂无数据!
		<%/if%>
		</ul>
		</div>
	</div>
</div>
<%/if%>
<%if {config.enablespace}==1%>
<div class="main wrap s_clear">
	<div class="box spacebox">
		<span><a href="spaceindex.aspx">更多&gt;&gt;</a></span>
		<h2>个人空间</h2>
		<%loop (SpaceConfigInfoExt) __spaceconfig spaceconfigs%>
		<%if {__spaceconfig[_id]}<=2 %>
		<dl>
			<dt><a href="{spaceurl}space/?uid={__spaceconfig.userid}" target="_blank"><img src="{__spaceconfig.spacepic}" alt="blogphoto" width="52" height="56" onerror="this.onerror=null;this.src='avatars/common/0.gif';"/></a></dt>
			<dd class="spacetitle"><a href="{spaceurl}space/?uid={__spaceconfig.userid}"><%getsubstring({__spaceconfig.spacetitle},20,"...")%></a></dd>
			<dd><a href="{spaceurl}space/viewspacepost.aspx?postid={__spaceconfig.postid}" target="_blank"><%getsubstring({__spaceconfig.posttitle},20,"...")%></a></dd>
			<dd>日志: <em>{__spaceconfig.postcount}</em>   <%if {config.enablealbum}==1%>{config.albumname}: <em>{__spaceconfig.albumcount}</em><%/if%> </dd>
		</dl>
		<%/if%>
        <%/loop%>
	</div>
	<div class="box journalbox">
		<span><a href="bloglist.aspx">更多&gt;&gt;</a></span>
		<h2>推荐日志</h2>
		<ul class="topiclist">
		    <%loop (SpaceShortPostInfo) __spacepostinfo spacepostlist%> 
		    <li><cite><a href="{spaceurl}space/?uid={__spacepostinfo.uid}" target="_blank">{__spacepostinfo.author}</a> ( <em title="回复数/浏览量">{__spacepostinfo.commentcount} / {__spacepostinfo.views} )</em></cite><a href="{spaceurl}space/viewspacepost.aspx?postid={__spacepostinfo.postid}"><%getsubstring({__spacepostinfo.title},56,"...")%></a> </li>
            <%/loop%>
		</ul>
	</div>
	<div class="box sidebox">
		<div class="sidetitlebar"><ul><li class="current" id="li_spacecomment"><a href="javascript:;" onclick="javascript:tabselect($('li_spacecomment'));">最新评论</a></li><li id="li_space"><a href="javascript:;" onclick="javascript:tabselect($('li_space'));">最新更新空间</a></li></ul></div>
		<div class="sideinner">
		<ul id="spacecommentlist" class="topicdot">
		<%loop comment spaceagg.GetSpaceTopComments(7)%>
		    <li><em>{comment[author]}</em><a href="{spaceurl}space/viewspacepost.aspx?postid={comment[postid]}" target="_blank"><%getsubstring(Discuz.Common.Utils.HtmlEncode({comment[content]}),30,"...")%></a></li>
		<%/loop%>
			<!--<li><em>fanzjgw</em><a href="#">Discuz!NT程序发布</a></li>-->
		</ul>
		<ul id="spacelist" class="topicdot" style="display:none;">
		<%loop space spaceagg.GetRecentUpdateSpaceList(7)%> 			
		    <li><a href="{spaceurl}space/?uid={space[userid]}" target="_blank"><%getsubstring({space[spacetitle]},30,"...")%></a></li>			
		<%/loop%>
		</ul>
		</div>
	</div>
</div>
<%/if%>
<%if {config.enablemall}==1%>	
<div class="main wrap s_clear">
	<div class="box mallbox">

		<span><a href="#">更多&gt;&gt;</a></span>
		<h2>最新上架产品</h2>
		<ul>
        <%set {goodscoll} = goodsagg.GetGoodsList("", "newgoods",0,6)%>
        <%if {goodscoll.count}>0%>
		<%loop (Goodsinfo) goodsinfo goodscoll%>
			<li>
			    <%set {aspxrewriteurl} = this.ShowGoodsAspxRewrite({goodsinfo.goodsid})%>
				<%if {goodsinfo.goodspic}==""%>
				        <img width="80" height="80" src="templates/{templatepath}/images/mall/nogoods_small.gif" onerror="this.onerror=null;this.src='{goodsinfo.goodspic}';"  title="{goodsinfo.title}">
				<%else%>
				        <img width="80" height="80" src="upload/{goodsinfo.goodspic}" onerror="this.onerror=null;this.src='{goodsinfo.goodspic}';"  title="{goodsinfo.title}">
                <%/if%>		
				<h4><a href="{aspxrewriteurl}" target="_blank">{goodsinfo.htmltitle}</a></h4>
				<p>市场价:<strike>{goodsinfo.price}</strike>元</p>
				<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({goodsinfo.selleruid})%>
				<p class="price">卖家:<a href="{aspxrewriteurl}" target="_blank">{goodsinfo.seller}</a></p>
			</li>
		<%/loop%>
		<%else%>
		    暂无数据!
		<%/if%>
		</ul>
	</div>
	<div class="box sidebox">
		<div class="sidetitlebar"><ul><li class="current" id="li_hot_goods"><a href="javascript:;" onclick="javascript:tabselect($('li_hot_goods'));">热门商品</a></li><li id="li_old_goods"><a href="javascript:;" onclick="javascript:tabselect($('li_old_goods'));">二手商品</a></li></ul></div>
		<div class="sideinner">
		<ul id="hot_goodslist" class="topicdot" style="display:;">
		<%set {goodscoll} = goodsagg.GetGoodsList("quality_new", "hotgoods",0,7)%>
		<%if {goodscoll.count}>0%>
		<%loop (Goodsinfo) hot_goods goodscoll%>
		    <li>
		        <em>
		            <%set {aspxrewriteurl} = this.UserInfoAspxRewrite({hot_goods.selleruid})%><a href="{aspxrewriteurl}" target="_blank">{hot_goods.seller}</a>
		        </em>
		        <%set {aspxrewriteurl} = this.ShowGoodsAspxRewrite({hot_goods.goodsid})%><a href="{aspxrewriteurl}" target="_blank"><%getsubstring({hot_goods.title},20,"...")%></a>
		    </li>
		<%/loop%>
		<%else%>
		    暂无数据!
		<%/if%>
		</ul>
		<ul id="old_goodslist" class="topicdot" style="display:none;">
		<%set {goodscoll} = goodsagg.GetGoodsList("quality_old", "" ,0,7)%>
		<%if {goodscoll.count}>0%>
		<%loop (Goodsinfo) reco_goods goodscoll%>
		    <li>
		        <em>
		            <%set {aspxrewriteurl} = this.UserInfoAspxRewrite({reco_goods.selleruid})%><a href="{aspxrewriteurl}" target="_blank">{reco_goods.seller}</a>
		        </em>
		        <%set {aspxrewriteurl} = this.ShowGoodsAspxRewrite({reco_goods.goodsid})%><a href="{aspxrewriteurl}" target="_blank"><%getsubstring({reco_goods.title},20,"...")%></a>
		    </li>
		<%/loop%>
		<%else%>
		    暂无数据!
		<%/if%>
		</ul>
		</div>
	</div>
</div>
<%/if%>
<!--<div class="adinner"><img src="images/gather/ad.gif" alt="广告"/></div>-->
<div id="statistics" class="main wrap s_clear">
	<div class="box sidebox">
		<div class="titlebar"><ul><li class="current">论坛点击量排行</li></ul></div>
		<div class="sideinner">
		<ul id="topic1">
        <%set {topiclist} = forumagg.GetForumTopicList(10, 0, 0, TopicTimeType.All, TopicOrderType.Views, false, false)%>	
		<%loop views_topicinfo topiclist%> 
            <li>
                <em>{views_topicinfo[views]}</em><cite <%if {views_topicinfo[_id]}==1 %>class="first"<%/if%> <%if {views_topicinfo[_id]}==2 %>class="second"<%/if%> <%if {views_topicinfo[_id]}==3%>class="third"<%/if%>>{views_topicinfo[_id]}</cite>
                <%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({views_topicinfo[tid]},0)%>
                <a href="{forumurl}{aspxrewriteurl}" target="_blank"><%getsubstring({views_topicinfo[title]},26,"")%></a>
           </li>            
        <%/loop%>
		</ul>
		</div>
	</div>
	<div class="box sidebox">
		<div class="titlebar"><ul><li class="current">论坛精华排行</li></ul></div>
		<div class="sideinner">
		<ul id="topic2">
		<%set {topiclist} = forumagg.GetForumTopicList(10, 0, 0, TopicTimeType.All, TopicOrderType.Replies, true, false)%>	
		<%loop digest_topicinfo topiclist%> 
           <li>
                <em>{digest_topicinfo[views]}</em><cite <%if {digest_topicinfo[_id]}==1 %>class="first"<%/if%> <%if {digest_topicinfo[_id]}==2%>class="second"<%/if%> <%if {digest_topicinfo[_id]}==3 %>class="third"<%/if%>>{digest_topicinfo[_id]}</cite>
                <%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({digest_topicinfo[tid]},0)%>
                <a href="{forumurl}{aspxrewriteurl}" target="_blank"><%getsubstring({digest_topicinfo[title]},26,"")%></a>
           </li>            
        <%/loop%>
		</ul>
		</div>
	</div>
	<div class="box sidebox">
		<div class="titlebar"><ul><li class="current">用户积分排行</li></ul></div>
		<div class="sideinner">
		<ul id="hottopic">
		<%set {userlist} = forumagg.GetUserList(10, "credits")%>	
		<%loop credits_user userlist%> 
		   <li>
                <em>{credits_user[credits]}</em><cite <%if {credits_user[_id]}==1%>class="first"<%/if%> <%if {credits_user[_id]}==2%>class="second"<%/if%> <%if {credits_user[_id]}==3%>class="third"<%/if%>>{credits_user[_id]}</cite>
                <%set {aspxrewriteurl} = this.UserInfoAspxRewrite({credits_user[uid]})%>
                <a href="{forumurl}{aspxrewriteurl}" target="_blank"><%getsubstring({credits_user[username]},20,"...")%></a>
           </li> 
        <%/loop%>     
		</ul>
		</div>
	</div>
	<div class="box sidebox" style="float:right; margin-right:0;">
		<div class="titlebar"><ul><li class="current">在线时长排行</li></ul></div>
		<div class="sideinner">
		<ul id="hottopic">
		<%set {userlist} = forumagg.GetUserList(10, "oltime")%>	
		<%loop oltime_user userlist%> 
		   <li>
                <em>{oltime_user[oltime]}分</em><cite <%if {oltime_user[_id]}==1%>class="first"<%/if%> <%if {oltime_user[_id]}==2%>class="second"<%/if%> <%if {oltime_user[_id]}==3%>class="third"<%/if%>>{oltime_user[_id]}</cite>
                <%set {aspxrewriteurl} = this.UserInfoAspxRewrite({oltime_user[uid]})%>
                <a href="{forumurl}{aspxrewriteurl}" target="_blank"><%getsubstring({oltime_user[username]},20,"...")%></a>
           </li> 
        <%/loop%>     
		</ul>
		</div>
	</div>
</div>
<%if {forumlinkcount}>0%>
<div class="main wrap s_clear">
<div class="box links" id="forumlinks">
	<h4>友情链接</h4>
	<%set (bool){forumlinkend} = false%>
	<%loop forumlink forumlinklist%>
		<%if {forumlink[_id]}==1%>
	<div class="forumlinks">	
		<ul>	
		<%/if%>
	<%if {forumlink[logo]}!=""%>
		<li>
			<a href="{forumlink[url]}" target="_blank"><img src="{forumlink[logo]}" alt="{forumlink[name]}"  class="forumlink_logo"/></a>
			<h5><a href="{forumlink[url]}" target="_blank">{forumlink[name]}</a></h5>
			<p>{forumlink[note]}</p>
		</li>
	<%else if {forumlink[name]}!="$$otherlink$$"%>
		<li>
			<h5>
				<a href="{forumlink[url]}" target="_blank">{forumlink[name]}</a>
			</h5>
			<p>{forumlink[note]}</p>
		</li>
	<%else%>
	<%if {forumlinkend}==false%>
		</ul>
	</div>
		<%set {forumlinkend} = true%>
	<%/if%>
	<div class="{forumlink[url]}">
		{forumlink[note]}
	</div>
	<%/if%>
	<%/loop%>
	<%if {forumlinkend}==false%>
	</ul>
	</div>
	<%/if%>
</div>
</div>
<%/if%>
<%else%>
<%template _errmsgbox%>
</div>
<%/if%>
<%template _copyright%>
<%template _adlist%>
<%template _footer%>